﻿@model enqueteJwVd.UserSurvey

@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Edit</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>UserSurvey ID:  @Html.DisplayFor(model => model.Id)</legend>

        @Html.HiddenFor(model => model.Id)

        <table>
            <tr>
                <td>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.UserFkId, "Users")
                    </div>
                </td>
                <td>
                    <div class="editor-field">
                        @Html.ListBox("Users", ViewBag.UsersList as MultiSelectList)
                        @Html.ValidationMessageFor(model => model.UserFkId)
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="editor-label">
                        @Html.LabelFor(model => model.SurveyFkId, "Survey")
                    </div>
                </td>
                <td>
                     <div class="editor-field">
                         @Html.DropDownList("SurveyFkId", String.Empty)
                         @Html.ValidationMessageFor(model => model.SurveyFkId)
                    </div>
                    </td>
                </tr>
            </table>
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
